package org.example.lotterysystem.service.enums;

import org.example.lotterysystem.dao.dataobject.ActivityPrizeDo;

public enum ActivityPrizeTiersEnum {

    FIRST_PRIZE(1,"一等奖"),

    SECOND_PRIZE(2,"二等奖");

    ActivityPrizeTiersEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    private final Integer code;
    private final String message;

    public static ActivityPrizeTiersEnum forname(String name){
        for (ActivityPrizeTiersEnum activityPrizeTiersEnum:ActivityPrizeTiersEnum.values()) {
            if(activityPrizeTiersEnum.name().equalsIgnoreCase(name)){
                return activityPrizeTiersEnum;
            }
        }
        return null;
    }
}
